# -*- coding: utf-8 -*-

from google.appengine.ext import db

class  People(db.Model):
    """
    People Model    
    """
    name = db.StringProperty(required=True)                                       #用户名
    password = db.StringProperty(required=True)                               #密码
    nickname = db.StringProperty(required=True)                               #昵称
    signature = db.StringProperty()                                                           #签名
    onlinetime = db.IntegerProperty(default=0)                                    #在线时间
    createdate = db.DateTimeProperty(auto_now_add=True)            #创建时间
    
class Message(db.Model):
    """
    Guest Book
    """
    name = db.StringProperty()                                                              #用户名
    nickname = db.StringProperty(required=True)                             #昵称
    content = db.StringProperty(multiline=True)                                 #内容
    date = db.DateTimeProperty(auto_now_add=True)                       #创建时间